/*
 * Copyright (c) 2010-present www.walkerljl.org All Rights Reserved.
 * The software source code all copyright belongs to the author, 
 * without permission shall not be any reproduction and transmission.
 */
package org.walkerljl.commons.mail.attach;


import org.walkerljl.commons.mail.EmailAttachment;

import javax.activation.DataSource;

/**
 * DataSourceAttachment
 *
 * @author lijunlin
 */
public class DataSourceAttachment extends EmailAttachment {

    protected final DataSource dataSource;

    public DataSourceAttachment(DataSource dataSource, String name, String contentId) {
        super(name, contentId);
        this.dataSource = dataSource;
    }

    /**
     * Returns wrapped data source.
     */
    @Override
    public DataSource getDataSource() {
        return dataSource;
    }
}
